﻿using System;
using System.BusinessObjects.Data;
using System.BusinessObjects.Providers;
using System.Web.Mvc;

namespace Blazing.MvcBlog.Controllers
{
    public class BaseController : Controller
    {
        #region .ctor
        public BaseController()
        {
            ((NHibernateAspContextProvider)NHibernateSessionProvider.Provider).BindNewSession();
        }
        ~BaseController()
        {
            NHibernateSessionProvider.Provider.CloseSession();
        }
        #endregion
    }
}
